package Adapter;

public class MediaAdapter {
    AdvanceMediaPlayer advancePlayer;

    public MediaAdapter(String audioType){
        if (audioType.equalsIgnoreCase("music")){
            advancePlayer = new MusicPlayer();
        }else if (audioType.equalsIgnoreCase("movie")){
            advancePlayer = new MoviePlayer();
        }
    }
    public void Play(String audioType,String fileName){
        if (audioType.equalsIgnoreCase("movie")){
            advancePlayer.playMovie(fileName);
        }else if (audioType.equalsIgnoreCase("music")){
            advancePlayer.playMusic(fileName);
        }
    }
}
